#ifndef COUNTERTHREAD_H
#define COUNTERTHREAD_H

#include "BasicType.h"
#undef sleep
#include <QThread>

#include "TThread.h"
#include "TCriticalSection.h"
#include "TEvent.h"

class CameraCounter;

class CounterThread : public QThread
{
    Q_OBJECT

public:
    CounterThread(CameraCounter& counter, int duration);

    virtual void run();
    void stop();

signals:
	void counterDone();

protected:
    CameraCounter&	m_counter;
    comn::Event		m_event;
    int	m_duration;
    bool	m_canExit;

};

#endif // COUNTERTHREAD_H
